'use strict';

function average_uneven(collection) {
  let arr = [];
  for(let item of collection){
    if(item%2 != 0){
      arr.push(item);
    }
  }
  let sum = arr.reduce(function(prevision,current){
    return prevision+current;
  })
  let result = sum/arr.length;
  console.log(result);
  return result;
   //在这里写入代码
 }
 average_uneven([1,2,3,4,5,6,7,8,9,10]);
 module.exports = average_uneven;
 